package com.yanqu.road.logic.bussiness.cross;

import com.yanqu.road.entity.tradewar.CrossUserTradeWarBattle;
import com.yanqu.road.entity.tradewar.UserTradeWarRecord;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.LinkedList;

public class CrossTradeWarBussiness {
    public static CrossUserTradeWarBattle getCrossUserTradeWarBattle(long userId) {
        return DaoHelper.getCrossUserTradeWarDaoImpl().getCrossUserTradeWarBattle(userId);
    }

    public static boolean addCrossUserTradeWarBattle(CrossUserTradeWarBattle crossUserTradeWarBattle) {
        return DaoHelper.getCrossUserTradeWarDaoImpl().add(crossUserTradeWarBattle);
    }

    public static boolean updateCrossUserTradeWarBattle(CrossUserTradeWarBattle crossUserTradeWarBattle) {
        return DaoHelper.getCrossUserTradeWarDaoImpl().update(crossUserTradeWarBattle);
    }

    public static LinkedList<UserTradeWarRecord> getUserTradeWarRecordList(long userId, int activityId, int maxCount) {
        return DaoHelper.getCrossTradeWarRecordDaoImpl().getUserTradeWarRecordList(userId, activityId, maxCount);
    }

    public static LinkedList<UserTradeWarRecord> getUserTradeWarRecordList(long userId, int activityId, long selectTime) {
        return DaoHelper.getCrossTradeWarRecordDaoImpl().getUserTradeWarRecordList(userId, activityId, selectTime);
    }

    public static boolean addUserTradeWarRecord(UserTradeWarRecord userTradeWarRecord) {
        return DaoHelper.getCrossTradeWarRecordDaoImpl().add(userTradeWarRecord);
    }

    public static boolean updateUserTradeWarRecord(UserTradeWarRecord userTradeWarRecord) {
        return DaoHelper.getCrossTradeWarRecordDaoImpl().update(userTradeWarRecord);
    }
}
